<div class="col-md-12 col-sm-12 col-xs-12">
  <div class="x_panel">
    <div class="x_title">
      <h2>{$pri_name} <small></small></h2>
      <div class="clearfix"></div>
    </div>
    <div class="x_content">

      <form class="form-horizontal form-label-left" novalidate action="" id="commentForm" method="post" enctype="multipart/form-data">
        <p><code>备注:</code>{$code}
        </p>
        <input type="password" style="display:none" />
        <input type="password" id="txtpwd" runat="server" maxlength="20" style="position: absolute;top:-9999px;" />
        <input type="password" style="display:none" />
        {notempty name="$role_pri"}
        <div class="item form-group">
          <label class="control-label col-md-3 col-sm-3 col-xs-12" for="data_id">单位列表 <span class="required">*</span>
          </label>
          <div class="col-md-6 col-sm-6 col-xs-12 ">
            {eq name="$Request.action" value="create"}
            <?php foreach ($role_pri as $k => $v): ?>
            <label><input required id="data_id" type="checkbox" name="data_id[]" value="<?php echo $v['id']; ?>" />
              <?php echo $v['title']; ?></label>
            <?php endforeach; ?>
            {else/}
            <?php foreach ($role_pri as $k => $v):
            if(strpos(','.$info['data_id_str'].',', ','.$v['id'].',') !== FALSE)
            $check = 'checked="checked"';
            else
            $check = '';
            ?>
            <label>
              <input required id="data_id" <?php echo $check; ?> type="checkbox" name="data_id[]" value="<?php echo $v['id']; ?>" />
              <?php echo $v['title']; ?></label>
            <?php endforeach; ?>
            {/eq}
          </div>
        </div>
        {/notempty}
        <div class="item form-group">
          <label class="control-label col-md-3 col-sm-3 col-xs-12" for="role_id">角色列表 <span class="required">*</span>
          </label>
          <div class="col-md-6 col-sm-6 col-xs-12 ">
            {eq name="$Request.action" value="create"}
            <?php foreach ($role_data as $k => $v): ?>
            <label><input required id="role_id" type="checkbox" name="role_id[]" value="<?php echo $v['id']; ?>" />
              <?php echo $v['role_name']; ?></label>
            <?php endforeach; ?>
            {else/}
            <?php foreach ($role_data as $k => $v):
            if(strpos(','.$role_id.',', ','.$v['id'].',') !== FALSE)
            $check = 'checked="checked"';
            else
            $check = '';
            ?>
            <label>
              <input required id="role_id" <?php echo $check; ?> type="checkbox" name="role_id[]" value="<?php echo $v['id']; ?>" />
              <?php echo $v['role_name']; ?></label>
            <?php endforeach; ?>

            {/eq}
          </div>
        </div>
        <div class="item form-group">
          <label class="control-label col-md-3 col-sm-3 col-xs-12" for="admin_name">用户名 <span class="required">*</span>
          </label>
          <div class="col-md-6 col-sm-6 col-xs-12 ">
            <input type="password" id="admin_name" name="admin_name" onfocus="this.name='admin_name'" autocomplete="off" onfocus="this.type='text'" value="{$info.admin_name|default=''}" minlength="2" required class="form-control col-md-7 col-xs-12" placeholder="">
          </div>
        </div>

        <script>

          $('[name="admin_name"]').attr('type','text')
        </script>
        <div class="item form-group">
          <label class="control-label col-md-3 col-sm-3 col-xs-12" for="admin_password">密码 <span class="required">*</span>
          </label>
          <div class="col-md-6 col-sm-6 col-xs-12 ">
            <input type="password" id="admin_password" name="admin_password" value="{$info.admin_password|default=''}" minlength="6" required class="form-control col-md-7 col-xs-12" placeholder="">
          </div>
        </div>
        <div class="item form-group">
          <label class="control-label col-md-3 col-sm-3 col-xs-12" for="confirm_password">确认密码 <span class="required">*</span>
          </label>
          <div class="col-md-6 col-sm-6 col-xs-12 ">
            <input  equalTo="#admin_password" type="password" id="confirm_password" name="confirm_password" onfocus="this.value='{$info.admin_password|default=\'\'}'" autocomplete="off" minlength="6" required class="form-control col-md-7 col-xs-12" placeholder="">
          </div>
        </div>
<!--        <div class="item form-group">-->
<!--          <label class="control-label col-md-3 col-sm-3 col-xs-12" id="for" for="up_img0">头像上传 <span class="required">*</span>-->
<!--          </label>-->
<!--          <div class="col-md-6 col-sm-6 col-xs-12 ">-->
<!--            &lt;!&ndash; bootstrap-imageupload. &ndash;&gt;-->
<!--            <div class="panel panel-default" id="jia" style="overflow:hidden;zoom:1;">-->
<!--              <div class="panel-heading clearfix">-->
<!--              <h3 class="panel-title pull-left">商品主图</h3>-->
<!--              <div class="btn-group pull-right">-->
<!--              <button type="button" class="btn btn-default active" id="add">添加</button>-->
<!--              &lt;!&ndash;<button type="button" class="btn btn-default">链接</button>&ndash;&gt;-->
<!--              </div>-->
<!--              </div>-->

<!--              {present name="info"}-->
<!--              {volist name="($info.multi_pic)" id="vo"}-->
<!--              <div class="file-tab panel-body" id="imgdiv{$key}" style="float:left;">-->
<!--                <img id="imgShow{$key}" src="{:thumbWater($vo,'154','144')}"  alt="Image preview" class="thumbnail" />-->
<!--                <input type="hidden" name="multi_pic_url[]" value="{$vo}" />-->
<!--                <label class="btn btn-default">选择文件-->
<!--                  <input type="file" name="multi_pic[]" value="{:thumbWater($vo,'154','144')}" id="up_img{$key}" style="display: none;" {if condition="request()->action() eq 'create'"}required{/if}/>-->
<!--                </label>-->
<!--                <label class="btn btn-default" onclick="rem(this)">移除文件</label>-->
<!--              </div>-->
<!--              <script>-->
<!--                  var targetSettings = {-->
<!--                      UpBtn: "up_img{$key}",-->
<!--                      DivShow: "imgdiv{$key}",-->
<!--                      ImgShow: "imgShow{$key}",-->
<!--                      callback:function(imgShow{$key}){-->
<!--                      // $('#'+'imgShow'+{$key}).next().remove();-->
<!--                      //alert(1);-->
<!--                  }-->
<!--                  };-->
<!--                  new uploadPreview(targetSettings);-->
<!--              </script>-->
<!--              {/volist}-->
<!--              {/present}-->

<!--            </div>-->

<!--            &lt;!&ndash; bootstrap-imageupload method buttons. &ndash;&gt;-->
<!--            &lt;!&ndash;&lt;!&ndash; bootstrap-imageupload method buttons. &ndash;&gt;&ndash;&gt;-->
<!--            &lt;!&ndash;<button type="button" id="imageupload-disable" class="btn btn-danger">Disable</button>&ndash;&gt;-->
<!--            &lt;!&ndash;<button type="button" id="imageupload-enable" class="btn btn-success">Enable</button>&ndash;&gt;-->
<!--            &lt;!&ndash;<button type="button" id="imageupload-reset" class="btn btn-primary">Reset</button>&ndash;&gt;-->
<!--          </div>-->
<!--        </div>-->
        <div class="item form-group">
          <label class="control-label col-md-3 col-sm-3 col-xs-12" for="sort">排序 <span class="required">*</span>
          </label>
          <div class="col-md-6 col-sm-6 col-xs-12 ">
            <input type="number" id="sort" name="sort" value="{$info.sort|default='0'}" required class="form-control col-md-7 col-xs-12" placeholder="">
          </div>
        </div>
        <div class="item form-group">
          <label class="control-label col-md-3 col-sm-3 col-xs-12">状态 <span class="required">*</span>
          </label>
          <div class="col-md-6 col-sm-6 col-xs-12 ">
            <div class="col-md-6 col-sm-6 col-xs-12 ">
              <div class="radio icheck-turquoise" style="display: inline-block">
                <input type="radio"  {eq name="info.status|default='1'" value="1"}checked=""{/eq} id="turquoise1" name="status" value="1">
                <label for="turquoise1" >开启 </label>
              </div>
              <div class="radio icheck-turquoise" style="display: inline-block">
                <input type="radio" id="turquoise2" name="status" {eq name="info.status|default=''" value="2"}checked=""{/eq} value="2">
                <label for="turquoise2">关闭</label>
              </div>
            </div>
          </div>
        </div>




        <div class="ln_solid"></div>
        <div class="form-group">
          <div class="col-md-6 col-md-offset-3">
            <button id="send" type="submit" class="btn btn-success">提交</button>
            <div class="btn btn-primary" onclick="history.go(-1)">返回</div>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>
